package com.weipai.springboot.module.dao.impl;

import com.weipai.springboot.model.IntegralGoods;
import com.weipai.springboot.module.dao.IntegralGoodsDao;
import com.weipai.springboot.module.mapper.IntegralGoodsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @Author: 曹朋飞
 * @Date: 2018/08/27 18:21
 */
@Repository
public class IntegralGoodsDaoImpl implements IntegralGoodsDao{
    
    @Autowired
    private IntegralGoodsMapper integralGoodsMapper;
    
    @Override
    public int insert(IntegralGoods integralGoods) {
        return integralGoodsMapper.insert(integralGoods);
    }

    @Override
    public int updateDel(String integralGoodsId) {
        return integralGoodsMapper.updateDel(integralGoodsId);
    }

    @Override
    public IntegralGoods getIntegralGoodsById(String integralGoodsId) {
        return integralGoodsMapper.getIntegralGoodsById(integralGoodsId);
    }

    @Override
    public int updateByPrimaryKey(IntegralGoods integralGoods) {
        return integralGoodsMapper.updateByPrimaryKey(integralGoods);
    }

    @Override
    public int batchDeleteById(String[] id) {
        return integralGoodsMapper.batchDeleteById(id);
    }

    @Override
    public int updateIntegralAndStatus(String theIntegral, String integralStatus, String integralGoodsId) {
        return integralGoodsMapper.updateIntegralAndStatus(theIntegral, integralStatus, integralGoodsId);
    }

    @Override
    public List<Map<String, Object>> selectAllByPage(Integer start, Integer size) {
        return integralGoodsMapper.selectAllByPage(start, size);
    }

    @Override
    public List<Map<String, Object>> selectAllByPage22(Integer start, Integer size) {
        return integralGoodsMapper.selectAllByPage22(start, size);
    }


    @Override
    public Integer selectAllByPageAmount() {
        return integralGoodsMapper.selectAllByPageAmount();
    }
    @Override
    public Integer selectAllByPageAmount22() {
        return integralGoodsMapper.selectAllByPageAmount22();
    }


    @Override
    public int updateByPrimaryKeySelective22(IntegralGoods integralGoods) {
        return integralGoodsMapper.updateByPrimaryKeySelective22(integralGoods);
    }

    @Override
    public IntegralGoods selectByGoodsId(String goodsId) {
        return integralGoodsMapper.selectByGoodsId(goodsId);
    }
}
